In [1]:
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt

Consider the function we should aim to maximise when measuring splitting.


In [28]:
# fig, ax = plt.subplots(3,sharey=True)
# ax[0] = plt.subplot(131)

lam1,lam2 = np.meshgrid(np.linspace(0,1,100),np.linspace(0,1,100))

In [45]:
def plt_func(z):
    z = np.ma.array(z)
    z[ (lam1>lam2) & (lam2>0) ] = np.ma.masked
    plt.contourf(lam2,lam1,z,100)

In [46]:
plt_func(lam1/lam2)


/Users/glyjw/anaconda/envs/py35/lib/python3.5/site-packages/ipykernel_launcher.py:1: RuntimeWarning: divide by zero encountered in true_divide
  """Entry point for launching an IPython kernel.
/Users/glyjw/anaconda/envs/py35/lib/python3.5/site-packages/ipykernel_launcher.py:1: RuntimeWarning: invalid value encountered in true_divide
  """Entry point for launching an IPython kernel.

In [39]:
plt_func((lam1-lam2)/lam2)


/Users/glyjw/anaconda/envs/py35/lib/python3.5/site-packages/ipykernel_launcher.py:1: RuntimeWarning: divide by zero encountered in true_divide
  """Entry point for launching an IPython kernel.
/Users/glyjw/anaconda/envs/py35/lib/python3.5/site-packages/ipykernel_launcher.py:1: RuntimeWarning: invalid value encountered in true_divide
  """Entry point for launching an IPython kernel.

In [ ]:
np.